<?php
require_once 'CMS/Util.php';
require_once 'CMS/User.php';
require_once 'CMS/Mvc/BaseController.php';
require_once 'CMS/Mvc/BaseAdminController.php';
require_once 'CMS/AdminCommon.php';


//Người tạo : Nguyễn Hồng Danh - Team 2
//Module 	: BillManager
//Chức năng	: Quản lý các bill

class Admin_BillController extends BaseAdminController {
		
	public function init(){
		parent::init();
		$this->_helper->layout()->setLayout('layoutadmin');
		$user = new User();
		$user->init();
		$user->check_login();
		$user->permission();
	}
	
	public function indexAction(){
		$dateInt = new Util();
		//Start ------- Check Input Parameter
		
		 /* if(!isset($_SESSION['Session_Admin'])||(!is_numberic($_SESSION['Session_Admin'])))
		  {
		  		$this->_redirect("/admin/login");
		  }
		 */
		//End ------- Check Input Parameter
		
		
		//Start ------- Khởi tạo Parameter
		$tb_Bills=new Admin_Model_Bill();
		//End ------- Khởi tạo Parameter
		
		$getAllBills=$tb_Bills->getAllOrders();
		$Update_Date=$dateInt->makeDays($getAllBills["updated_date"]);
		//Start ------- Truyền Parameter qua View
		$this->view->AllBills=$getAllBills;
		//End ------- Truyền Parameter qua View
	}
}